package com.helen.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.helen.entity.RecoveryOrderEntity;
import com.helen.shopping.R;
import com.helen.utils.MyLog;

import java.util.List;


/**
 * Created by yang on 2018/5/2.
 */

public class RecoveryOrderListAdapter extends BaseQuickAdapter<RecoveryOrderEntity, BaseViewHolder> {
    public RecoveryOrderListAdapter(int layoutResId, List<RecoveryOrderEntity> data) {
        super(layoutResId, data);

    }


    @Override
    protected void convert(final BaseViewHolder helper, final RecoveryOrderEntity item) {
        try {
            TextView tvType = (TextView) helper.getView(R.id.tv_type);
            TextView tvGoodName = (TextView) helper.getView(R.id.tv_good_name);
            TextView tvTime = (TextView) helper.getView(R.id.tv_time);
            TextView tvNote = (TextView) helper.getView(R.id.tv_note);
            tvType.setText("物品分类: " + item.getType());
            tvGoodName.setText("物品名称: " + item.getClassname());
            tvTime.setText("预约时间: " + item.getTime());
            tvNote.setText("备       注: " + item.getRemarks());
        } catch (Exception e) {
            MyLog.e("yang", "设置回收订单列表异常" + e.toString());
        }

    }
}